<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const obj = {
            id:9,
            uname: 'zs',
            age: 18,
            hobbit: ['抽烟', '喝酒', '烫头'],
            obj2:{
              id:10,
              uname:"ls",
              age:28,
              hobbit:['吃饭','睡觉','敲代码']
            }
          }

           let {id, uname , age , hobbit:[smoking ,drink,perm],obj2:{id : newid ,uname : newuname ,age :newgae ,hobbit:[eat,sleep ,knock]} } = obj
          console.log(id);
          console.log(uname);
          console.log(age);
          console.log(smoking);
          console.log(drink);
          console.log(perm);
          console.log(newid);
          console.log(newuname);
          console.log(newgae);
          console.log(eat);
          console.log(sleep);
          console.log(knock);
    </script>
  </body>
</html>
